<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>

<body>
    <button id="box">
  打开窗口
    </button>
    <button id="box1">
        移动窗口
          </button>
    <script>
        var btn = document.getElementById('box');
        btn.onclick = function() {
            aa = window.open('', 'aa', 'width=600 height=600');
        }

        var btn1 = document.getElementById('box1');
        btn1.onclick = function() {
            aa.moveTo(150, 150);
        }
    </script>
</body>

</html>